package com.you.swagger.controller;

import com.you.swagger.entity.UserInfo;
import com.you.swagger.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

//@Controller
//@Component
//@RequestMapping("/user")
@Api("用户服务接口")
public class UserController implements IUserInterface {

    @Autowired
    IUserService userService;


    @Override
    public UserInfo getUserInfo(UserInfo userInfo) {
        String userId = "1";
        return userService.findUserInfoByUserId(userId);
    }

    //@PostMapping("/updateUserInfo")
    //@ResponseBody
    @Override
    public boolean updateUserInfo(String userId, String userName) {
        System.out.println("---参数----" + userId + "," + userName);
        return true;
    }
}
